﻿@{
    ViewBag.Title = "PublicationTypeSearchView";
}

<div class="row">
    <div class="col-md-12">
        <ol class="breadcrumb">
            <li>@Html.ActionLink("Home", "Index", "Home")</li>
            <li>@Html.ActionLink("Tipo publicación", "Search", "PublicationType")</li>
            <li class="active">Buscar</li>
        </ol>
    </div>
</div>

<div class="col-md-10">
    <div class="pull-right">
        <a href="@Url.Content("~/PublicationType/Create")" class="btn btn-primary">
            <i class="glyphicon glyphicon-plus"></i> Nuevo Tipo de Publicación
        </a>
    </div>
</div>
<br>

<div class="row">
    <div class="col-md-12 title">
        <h1>Búsqueda Tipo Publicación</h1>
    </div>
</div>

<div class="col-md-10">
    @if (TempData["message"] != null)
    {
        <div class="alert alert-success" role="alert">@TempData["message"]</div>
    }
    @if (TempData["alert"] != null)
    {
        <div class="alert alert-danger" role="alert">@TempData["alert"]</div>
    }

</div>

<div class="row">
    @using (Html.BeginForm("SearchResult", "PublicationType"))
    {
        <div class="col-md-10">
            <div class="form-group">
                <div class="row">
                    <div class="col-md-1">
                    </div>
                    <div class="col-md-2">
                        <label for="tipo">Código</label>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <input class="form-control" type="text" name="codigo" pattern="[0-9]*" title="Solo números" maxlength="10" />
                        </div>
                    </div>
                </div>
            </div>
    
            <div class="form-group">
                <div class="row">
                    <div class="col-md-1">
                    </div>
                    <div class="col-md-2">
                        <label for="tipo">Nombre</label>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <input type="text" class="form-control" name="nombre" pattern="[A-Za-zá-ú\s]+" title="Solo letras y espacios" maxlength="50" />
                        </div>
                    </div>
                </div>
            </div>

            @if (ViewBag.pageIndex != null)
            {
                <input type="hidden" value="@ViewBag.pageIndex" name="pageIndex" id="PRS_pageIndex" class="form-control">
            }
            else
            {
                <input type="hidden" value="1" name="pageIndex" id="PRS_pageIndex">
            }
            <div class="col-md-9">
                <button type="submit" class="btn btn-primary pull-right" id="btnSearchResutlView">Buscar</button>
            </div>
        </div>
    }
</div>
